import request from "@/utils/request";

// 获取表单信息
export const getUserApi = (params) => {
  return request({
    url: "auth/user",
    method: "get",
    params,
  });
};

// 添加管理员
export const addUserApi = (data) => {
  return request({
    url: "auth/user",
    method: "post",
    data,
  });
};

// 单个管理员数据
export function editUserApi(id) {
  return request({
    url: `auth/user/${id}`,
    method: "get",
  });
}
// 修改请求
export function editUserListApi(data) {
  return request({
    url: `auth/user/${data.id}`,
    method: "put",
    data,
  });
}
// 删除当前
export const delUserApi = (id) => {
  return request({
    url: "auth/user/" + id,
    method: "delete",
  });
};
